package com.training.java.core.collections.post15.Set.CellPhone;

public class CellPhone {

	private String company;
	private String model;
	private String operatingSystem;
	private int price;
	private String description;

	public CellPhone(String company, String model, String operatingSystem) {

		this.company = company;
		this.model = model;
		this.operatingSystem = operatingSystem;

	}

	public String getCompany() {
		return company;
	}

	public String getModel() {
		return model;
	}

	public String getOperatingSystem() {
		return operatingSystem;
	}

	public int getPrice() {
		return price;
	}

	public String getDescription() {
		return description;
	}

	@Override
	public boolean equals(Object obj) {

		CellPhone that = (CellPhone) obj;

		if (this.getCompany().equals(that.getCompany())
				&& this.getModel().equals(that.getModel())
				&& this.getOperatingSystem().equals(that.getOperatingSystem()))
			return true;
		else
			return false;

	}

	@Override
	public int hashCode() {
		return (this.getCompany().hashCode());
	}

}
